//引入mockjs
import Mock from 'mockjs'
//使用mockjs模拟数据
Mock.mock('/mock/test', {
    "code":0,
    "data|3":[
        {
            "mtime": "@datetime",//随机生成日期时间
            "score|1-800": 800,//随机生成1-800的数字
            "rank|1-100":  100,//随机生成1-100的数字
            "stars|1-5": 5,//随机生成1-5的数字
            "nickname": "@cname",//随机生成中文名字
          },
    ],
      "msg":'请求成功',
//data里的属性看不懂，需要详细看语法规范,博客链接:https://www.jianshu.com/p/4579f40e6108
});


Mock.mock('/api/home/notice',{
    "code":"200",
    "msg":"获取公告成功",
    "data|6":[
        {
            "id":"@increment()",
            "title":"@ctitle(15)",
            "add_time":"@date(yyyy-MM-dd)",
            "sentence":"@csentence(100,200)"
        },
    ],
})
